Editing Attributes DXL

Hello Everyone,

 

I am trying to edit a System generated attribute ( specifically Object Number) I know this is not possible so I want to create a custom attribute that is always the same as the Object Number. 

 

The reason I want to do this is because i want to then edit the attribute DXL script and delete the digits following the dash "-"- which will give me the Document section that the attribute is in.

 

For example we have requirement The car shall travel at 40mph, and its Object Number is 3.4.5.0-3. This requirement is under section 3.4.5 which ( this heading has a object number of 3.4.5).

 

I want my new attribute Paragraph Number, or Section Number to be 3.4.5 for that requirement.

 

Please let me know how this can be done.

I know the modifying the actual string will be find (-) delete 2 characters to the left, and all characters to the right.

 

Thank you


Alex_4_IBM - Fri Jul 29 08:09:59 EDT 2016

Re: Editing Attributes DXL
Wolfgang Uhr - Fri Jul 29 08:47:47 EDT 2016

Try something like this:

 

string sMySpecialAttribute = parent(objWork)."Object Number";

 

Re: Editing Attributes DXL
Alex_4_IBM - Fri Jul 29 09:09:40 EDT 2016

Wolfgang Uhr - Fri Jul 29 08:47:47 EDT 2016

Try something like this:

 

string sMySpecialAttribute = parent(objWork)."Object Number";

 

This does not work, I am getting multiple errors from that line

Re: Editing Attributes DXL
DOORSHAM - Sun Jul 31 09:51:10 EDT 2016

You might want to use the parent of an object to get the number you want.

 

Also  try something like:  string s = number obj

Re: Editing Attributes DXL
Wolfgang Uhr - Mon Aug 01 04:38:27 EDT 2016

Alex_4_IBM - Fri Jul 29 09:09:40 EDT 2016

This does not work, I am getting multiple errors from that line

Ok, then coorect this errors.

Of course objWork shall be initialized in any way and if doors cannot handle the command in one line, split it. I actually have no doors. I cannot deliver tested code.

Re: Editing Attributes DXL
Alex_4_IBM - Mon Aug 01 12:20:04 EDT 2016

DOORSHAM - Sun Jul 31 09:51:10 EDT 2016

You might want to use the parent of an object to get the number you want.

 

Also  try something like:  string s = number obj

Getting the parent of an object may be exactly what I need as i would not need to script the removal of ".0-nnn-nnn" so on

 

Is this a pre populate command or script?

 

Do you have a DXL i can use? My DXL script and any coding experience are very limited

 

Thank you so much